<template>
	<view class="index" :style="[navBackground]">
		<!-- #ifdef H5 -->
		<download-nav v-if="isShowDownload"></download-nav>
		<!-- #endif -->
		<u-sticky offset-top="0" h5-nav-height="0" bg-color="transparent" :enable="enable">
			<u-navbar :border-bottom="false" :is-fixed="false" title="社区" :title-bold="true" custom-class="home-bg" :background="navBackground"
				:is-back="false" />
		</u-sticky>
		<star-community></star-community>
	</view>
</template>

<script>
	import {
		mapGetters
	} from 'vuex'
	export default {
		data() {
			return {
				enable: true,
				isShowDownload: false,
			}
		},
		async onLoad(options) {
			// #ifdef H5
			if (options && options.isapp == 1) {
				this.isShowDownload = true;
			}
			// #endif
		},
		computed: {
			...mapGetters(["appConfig"]),
			navBackground() {
				return this.seting.top_bg_image ? {
					'background-image': `url(${this.seting.top_bg_image})`
				} : {}
			},
			seting() {
				const {
					index_setting
				} = this.appConfig
				return index_setting
			}
		}
	}
</script>

<style>
</style>